#include <iostream>

using namespace std;

class foo {
public:
        int a;
        int b;
        double d;
        foo() {}
        foo(int aa, int bb, double dd) {a = aa, b = bb, d = dd;}
        friend ostream &operator<<(ostream &os, const foo &);
};

ostream &operator<<(ostream &os, const foo &d)
{
        os << "(" << d.a << "," << d.b << "," << d.d << ")";
}

int main()
{
        foo bar(1,3, 7.9);

        cout << bar << endl;

        return 0;
}
